This invention relates to a figure recognition apparatus, and more particularly to an apparatus for recognizing a handwritten figure produced by such a position determination equipment as a digitizer or a tablet.
A figure which is an object of recognition is approximated by a connection of elementary line segments. Usually, two kinds of elementary line segments are used, the one being a straight line segment and the other being a circular arc segment. A point connecting two line segments is called a feature point of the figure. Generally, a figure recognition apparatus detects feature points in a figure and defines the figure by position coordinates of the detected feature points and by kinds of line segments between adjacent feature points. A figure drawn on a sheet is read by a picture input unit such as a TV camera, and is temporally stored in an image memory. Or an image of a figure is generated by an interactive input such unit as a digitizer or a tablet, and position coordinate data for points in the figure are determined by the interactive unit. Thus, it will be said that coordinate positions of all the pixels in the figure are determined by the picture input unit. Therefore, the first step of figure recognition is to detect feature points in the figure.
As a prior art of this invention, there is a Japanese patent application entitled "A system for figure recognition" and laid open as a Provisional Publication No. 62107/'92. This prior art is described in connection with FIG. 8, wherein a block diagram of the prior art is illustrated.
Position coordinate data for points in a figure are determined by a picture input unit 11 and are read out by an output unit of a train of points 12. The train of points read out from the output unit 12 is delivered to a discard decision unit 31, wherein many points are discarded leaving only sample points. Data for the sample points are stored in a position data memory 13. In this specification, data for a point currently read out from the output unit 12 will be called data for an attention point.
The distance between the attention point and the sample point which is lastly written in the position data memory 13 is calculated in a distance calculation unit 16. This calculated distance is referred in the discard decision unit 31 for deciding whether to discard the attention point. A calculation unit for a feature point probability 32, calculates, for each sample point, a probability in which the sample point is a feature point. Line type decision unit 19 decides a line type between adjacent feature points. Figure shape decision unit 20 decides a figure shape from the output of the calculation unit of a feature point probability 32 and the output of the line type decision unit 19. The decided figure shape is displayed on a display unit 21.
FIG. 9 shows a flow chart illustrating the performance of the discard decision unit 31 where 102 and 106 are program steps executed in the discard decision unit 31.
When the picture input unit 11 is a TV camera or a CCD sensor for converting a picture of a figure drawn on a sheet to an image of the figure, a line of the figure has a wide breadth in the image. The output unit of a train of points 12 reduces the breadth of a line to a point by a conventional line thinning process, and converts the image of the figure to a train of points representing the figure. This train of points are stored in the image memory.
When the picture input unit 11 is an interactive input unit using a digitizer or a tablet, position coordinates data of points in a figure are determined by the picture input unit 11. The output unit of a train for points 12 supplies position coordinates of an attention point to the distance calculation unit 16 and the discard decision unit 31. The distance calculation unit 16 calculates a distance 1 from a sample point lastly stored in the position data memory 13 to the attention point. To a predetermined threshold Lth, the distance 1 is compared in the discard decision unit 31, and when 1&gt;Lth(step 102 in FIG. 9), the attention point is recognized as a sample point and is stored in the position data memory 13(step 106 of FIG. 9). Otherwise, the attention point is discarded and a next attention point is read out from the output unit of a train of points 12.
The position data memory 13 is composed, for example, of a FIFO(first-in-first-out) memory having addresses 1-N. A newly stored data is written at an address 1, transferring data which has been stored at an address K (1.ltoreq.K&lt;N) to an address K+1 and extinguishing data which has been stored at an address N. Thus, N newest data are stored in the position data memory 13.
In this specification, a sample point vector is defined as a vector from the sample point to the next sample point. A calculation unit of a feature point probability 32 calculates the feature point probability of a sample point by direction difference between the sample point vector of the sample point and that of the preceding sample point. A sample point is recognized as a feature point in accordance with the feature point probability. For example, a sample point which has a feature point probability larger than a predetermined threshold is recognized as a feature point. A line type decision unit 19 decides the kind of line segments between adjacent feature points. When the directions of the sample point vectors between the feature points are in a same range, the line segments are recognized as a linear line segment, and when the directions of the sample point vectors between the feature points change nearly uniformly, the line segments are recognized as an arc of a circle.
A figure shape decision unit 20 refers to a recognition dictionary(not shown in the drawing) for the feature point probability decided by the calculation unit of a feature point probability 32 and for the line type decided by the line type decision unit 19, and determines a figure shape in accordance with the matching to the dictionary data. The result of recognition at the figure shape decision unit 20 is displayed by the display unit 21.
In the heretofore known apparatus described in connection with FIG. 8, the calculation unit of a feature point probability 32 is liable to give a mistaken output, resulting in a mistaken decision in the figure shape decision unit 20 when the image of the figure has noise interferences.
When the picture input unit 11 is a TV camera or a CCD sensor for generating analog voltage signals, the analog signals must first be converted to binary signals, and at the conversion, a random noise called an edge noise is generated. For a handwritten figure, trembling of a hand produces a random noise. In an interactive input unit where an LCD is combined with a tablet, a burst noise may be generated by electro-magnetic waves radiated from the LCD.
FIGS. 10 show effect of a random and a burst noise on the apparatus of FIG. 8. FIG. 10(a) shows a train of points in the image memory of the output unit of a train of points 12, under an influence of a random noise and a burst noise. A black point surrounded by a circle shows the influence of a burst noise, and all the other black points show the influence of a random noise. The threshold value Lth in FIG. 9 is to be determined to eliminate the influence of the random noise. When Lth is determined as shown in FIG. 10(b), the point under the influence of the burst noise may be selected as a sample point and recognized as a feature point. When Lth is determined as shown in FIG. 10(c), the point under the influence of the burst noise is eliminated, but the shape of the figure can not be faithfully reproduced by sample points and a feature point may be overlooked.